package com.gift.recommendation.modules.admin.biz;

import com.gift.recommendation.modules.admin.dto.PictureReq;
import com.gift.recommendation.modules.admin.dto.PictureRsp;
import com.gift.recommendation.util.FileUpLoadUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author zzh <2658137258@qq.com>
 * @date 2023/2/20
 */
@Service
public class PictureImpl {

    @Autowired
    private FileUpLoadUtils fileUpLoadUtils;

    public PictureRsp upload(MultipartFile multipartFile) {
        return fileUpLoadUtils.uploadImg(multipartFile);
    }

    public void delete(PictureReq req) {
        fileUpLoadUtils.deleteImg(req);
    }
}
